<!-- Generated template for the TimeFilterComponent component -->
<script src="time-filter.ts"></script>
<div class="info-head">
    <span>{{filterType===1?'时间范围':'时间段'}}</span>
    <!-- <span (click)="filter()">搜索</span> -->
    <span class="timeFilter" *ngIf="filterType===1">
            <span
                (click)="openStartTimePicker()">{{startDate?(startDate|myDate:'YYYY/MM'):'开始时间'}}</span><span
        class="line"></span><span (click)="openEndTimePicker()">{{endDate?(endDate|myDate:'YYYY/MM'):'结束时间'}}</span>
        </span>
    <span class="one-timeFilter" *ngIf="filterType===2">
            <span
                (click)="openFilterTimePicker()">{{filterDate?(filterDate|myDate:'YYYY/MM'):'选择时间'}}</span>
        </span>
    <!--<div class="btn-panel">

    </div>-->
    <span class="query" (click)="click()">查询</span>
</div>
<ion-item style="display:none;">
    <ion-datetime *ngIf="filterType===1" #endTime cancelText="取消" doneText="确定" yearValues="{{yearList}}"
                  pickerFormat="YYYY MM"
                  [(ngModel)]="endFilterDate" [initialValue]="initialValue"
                  [pickerOptions]="pickerOptions"></ion-datetime>
    <ion-datetime *ngIf="filterType===1" #startTime cancelText="取消" doneText="确定" yearValues="{{yearList}}"
                  displayFormat="YYYY/MM"
                  pickerFormat="YYYY MM"
                  [(ngModel)]="startFilterDate" [initialValue]="initialValue" [pickerOptions]="pickerOptions">
    </ion-datetime>
    <ion-datetime *ngIf="filterType===2" #filterTime cancelText="取消" doneText="确定" yearValues="{{yearList}}"
                  displayFormat="YYYY/MM"
                  pickerFormat="YYYY MM"
                  [(ngModel)]="filterDate" [initialValue]="initialValue" [pickerOptions]="pickerOptions">
    </ion-datetime>
</ion-item>
